﻿using Lanbt.Core.Entity.Dto;
using Lanbt.Core.Entity.Dto.lanbt_user;

namespace Lanbt.Core.Service.SqlService.IService
{
    public interface IUserService
    { 

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultOutput<string>> Input(LoginInput input);

        /// <summary>
        /// 根据用户id获取用户
        /// </summary>
        /// <param name="id">用户ID</param>
        /// <returns></returns>
        Task<ResultOutput<GetCurrentUserOutput>> GetUserById(string id);

        /// <summary>
        /// 获取登陆人信息
        /// </summary>
        /// <returns></returns>
        Task<ResultOutput<GetUserInfo>> GetUserInfo(string userId);

        /// <summary>
        /// 获取分页用户列表
        /// </summary>
        /// <returns></returns>
        Task<PagesResultOutput<QueryUsersOutput>> QueryPagesUsers(QueryUsersInput input);

        /// <summary>
        /// 添加单个用户
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultOutput<string>> InsertUser(InsertUserInput input);

        /// <summary>
        /// 添加超级管理员
        /// </summary>
        /// <returns></returns>
        Task<ResultOutput<bool>> AddAdmin();

        /// <summary>
        /// 根据id删除单个用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteById(string id);

        /// <summary>
        /// 根据id批量删除用户
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task DeleteByIds(List<string> ids);

        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task Update(UpdateUserInput input);

        /// <summary>
        /// 根据id修改是否是管理员
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultOutput<string>> UpdateIsAdminById(string id);

        /// <summary>
        /// 修改用户密码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ResultOutput> UpdatePassword(UpdatePasswordInput input);

        /// <summary>
        /// 修改角色ids
        /// </summary>
        /// <param name="input">用户id</param>
        /// <returns></returns>
        Task<ResultOutput<string>> UpdateRoleIdsById(UpdateRoleIdsByIdInput input);
    }
}
